<?php
class model_siteconf extends Model
{
	function __construct()
	{
		parent::__construct();
	}
	
	function get($type="*")
	{
		$this	->db->select("*")
				->from("site_conf")
				->order_by("conf_name");
		if($type != "*")
		{
			$this->db->where(array("company_id"=>$type));
		}
				
		$r = $this->db->get();
		

		return $r->result_array();
	}

	function get_from_id($id="")
	{
		$this	->db->select("*")
				->from("site_conf")
			    ->where(array("id"=>$id));
				
		$r = $this->db->get();
		
		return $r->row_array();	
	}
	
	function update($data, $id)
	{
		$this->db->update('site_conf', $data, array("id" => $id));
		
	}
	

	
}